import request from '@/config/axios'

export interface TenantServiceVO {
  id?: number
  serviceId: number
  startTime: Date | number
  endTime: Date | number
  tenantId: number
}

// 查询套餐服务关联列表
export const getTenantServicePage = async (params) => {
  return await request.get({ url: `/system/tenant-service/page`, params })
}

// 查询套餐服务关联详情
export const getTenantService = async (id: number) => {
  return await request.get({ url: `/system/tenant-service/get?id=` + id })
}

// 新增套餐服务关联
export const createTenantService = async (data: TenantServiceVO) => {
  return await request.post({ url: `/system/tenant-service/create`, data })
}

// 修改套餐服务关联
export const updateTenantService = async (data: TenantServiceVO) => {
  return await request.put({ url: `/system/tenant-service/update`, data })
}

// 删除套餐服务关联
export const deleteTenantService = async (id: number) => {
  return await request.delete({ url: `/system/tenant-service/delete?id=` + id })
}

// 导出套餐服务关联 Excel
export const exportTenantService = async (params) => {
  return await request.download({ url: `/system/tenant-service/export-excel`, params })
}
